package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.XxTemporaryMemberConsumeRecordMapper;
import com.ruoyi.system.domain.XxTemporaryMemberConsumeRecord;
import com.ruoyi.system.service.IXxTemporaryMemberConsumeRecordService;

/**
 * 散客消费记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-12
 */
@Service
public class XxTemporaryMemberConsumeRecordServiceImpl implements IXxTemporaryMemberConsumeRecordService 
{
    @Autowired
    private XxTemporaryMemberConsumeRecordMapper xxTemporaryMemberConsumeRecordMapper;

    /**
     * 查询散客消费记录
     * 
     * @param recordId 散客消费记录主键
     * @return 散客消费记录
     */
    @Override
    public XxTemporaryMemberConsumeRecord selectXxTemporaryMemberConsumeRecordByRecordId(Long recordId)
    {
        return xxTemporaryMemberConsumeRecordMapper.selectXxTemporaryMemberConsumeRecordByRecordId(recordId);
    }

    /**
     * 查询散客消费记录列表
     * 
     * @param xxTemporaryMemberConsumeRecord 散客消费记录
     * @return 散客消费记录
     */
    @Override
    public List<XxTemporaryMemberConsumeRecord> selectXxTemporaryMemberConsumeRecordList(XxTemporaryMemberConsumeRecord xxTemporaryMemberConsumeRecord)
    {
        return xxTemporaryMemberConsumeRecordMapper.selectXxTemporaryMemberConsumeRecordList(xxTemporaryMemberConsumeRecord);
    }

    /**
     * 新增散客消费记录
     * 
     * @param xxTemporaryMemberConsumeRecord 散客消费记录
     * @return 结果
     */
    @Override
    public int insertXxTemporaryMemberConsumeRecord(XxTemporaryMemberConsumeRecord xxTemporaryMemberConsumeRecord)
    {
        xxTemporaryMemberConsumeRecord.setCreateTime(DateUtils.getNowDate());
        return xxTemporaryMemberConsumeRecordMapper.insertXxTemporaryMemberConsumeRecord(xxTemporaryMemberConsumeRecord);
    }

    /**
     * 修改散客消费记录
     * 
     * @param xxTemporaryMemberConsumeRecord 散客消费记录
     * @return 结果
     */
    @Override
    public int updateXxTemporaryMemberConsumeRecord(XxTemporaryMemberConsumeRecord xxTemporaryMemberConsumeRecord)
    {
        xxTemporaryMemberConsumeRecord.setUpdateTime(DateUtils.getNowDate());
        return xxTemporaryMemberConsumeRecordMapper.updateXxTemporaryMemberConsumeRecord(xxTemporaryMemberConsumeRecord);
    }

    /**
     * 批量删除散客消费记录
     * 
     * @param recordIds 需要删除的散客消费记录主键
     * @return 结果
     */
    @Override
    public int deleteXxTemporaryMemberConsumeRecordByRecordIds(Long[] recordIds)
    {
        return xxTemporaryMemberConsumeRecordMapper.deleteXxTemporaryMemberConsumeRecordByRecordIds(recordIds);
    }

    /**
     * 删除散客消费记录信息
     * 
     * @param recordId 散客消费记录主键
     * @return 结果
     */
    @Override
    public int deleteXxTemporaryMemberConsumeRecordByRecordId(Long recordId)
    {
        return xxTemporaryMemberConsumeRecordMapper.deleteXxTemporaryMemberConsumeRecordByRecordId(recordId);
    }
}
